"""
Configuration for PaddleOCR FastAPI Service
"""
from pathlib import Path

# Model paths
MODEL_DIR = Path("model")
DET_MODEL_PATH = MODEL_DIR / "ch_PP-OCRv3_det_infer" / "inference.pdmodel"
REC_MODEL_PATH = MODEL_DIR / "ch_PP-OCRv3_rec_infer" / "inference.pdmodel"

# Font and character dictionary paths
FONT_PATH = Path("fonts/simfang.ttf")
CHARACTER_DICT_PATH = Path("fonts/ppocr_keys_v1.txt")

# Inference device
INFERENCE_DEVICE = "AUTO"  # Can be "CPU", "GPU", "NPU", "AUTO"

# Detection parameters
DET_INPUT_SIZE = 640
DET_THRESHOLD = 0.3

# Recognition parameters
REC_IMAGE_SHAPE = [3, 48, 320]
REC_BATCH_SIZE = 6
REC_DROP_SCORE = 0.5

# Video processing parameters
VIDEO_MAX_SIDE = 1280
VIDEO_FPS = 30

# API parameters
MAX_VIDEO_SIZE_MB = 500  # Maximum video file size in MB
ALLOWED_VIDEO_FORMATS = [".mp4", ".avi", ".mov", ".mkv", ".flv", ".wmv"]

